{{useCss "app-pages/css/classify.scss"}}
<div class="classify">
	<div class="classify_list">
		<div class="root">
			{{#each $Cache.classify.tree.childs}}
			<href class="item {{($Top.$Cache.classify.pointer_classify.current_classify._id==classify._id)&&'focus'}}" to="/classify.html?root_id={{classify._id}}">{{classify.classify_name}}</href>
			{{/each}}
		</div>
		{{#if !$Cache.classify.pointer_classify.child_classify_list.length}}
		<div class="second">
			<p>此目录下为空！</p>
		</div>
		{{#else}}
		<div class="second">
			{{#each $Cache.classify.pointer_classify.child_classify_list}}
				<href class="item" to="/classify.html?root_id={{$Top.$Cache.classify.pointer_classify.current_classify._id}}&second_id={{_id}}">
					<img bind-src="{{icon_url}}?imageView/1/w/100/h/100" />
					{{classify_name}}
				</href>
			{{/each}}
		</div>
		<div class="childs">
			{{#if $Cache.classify.pointer_second_classify.child_classify_list.length}}
				{{#each $Cache.classify.pointer_second_classify.child_classify_list}}
				<href class="item" to="/classify.html?root_id={{$Top.$Cache.classify.pointer_classify.current_classify._id}}&second_id={{$Top.$Cache.classify.pointer_second_classify.current_classify._id}}&classify_id={{_id}}">{{classify_name}}</href>
				{{/each}}
			{{#else}}
			<p>此目录下为空</p>
			{{/if}}
		</div>
		{{/if}}
	</div>

	<div class="listtitle">
        {{$Cache.classify.title}}
    </div>

    <div class="list">
        {{#each $Cache.classify.goods_list}}
        <div class="listitem">
            <div class="goodsimg">
                <href to="/goods_details.html?id={{_id}}">
                    <img bind-src="{{preview_img_url}}?imageView/1/w/250/h/250" />
                </href>
            </div>
            <div class="box">
                <div class="info">
                    <href class="name" to="/goods_details.html?id={{_id}}">
                        {{goods_name+" "}}
                    </href>
                </div>
                <div class="info">
                    <div class="price">￥{{#Fixed cash}}</div>
                </div>
            </div>
        </div>
        {{/each}}
	    <div id="_mark"></div>
	    {{#if $Cache.classify.isloading}}
			<p><i class="icon-spin4"></i>正在加载数据</p>
	    {{#else}}
		    {{#if !$Cache.classify.goods_list.length}}
		    <div class="listitem">
		        <i>此目录下暂没有上传商品</i>
		    </div>
		    {{/if}}
	    {{/if}}
    </div>
</div>